package com.wenson.behavior.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: IteratorClient
 * @Author: luowangcheng
 * @Date: 2024/6/15 12:45
 * @Description:
 */
public class IteratorClient {
    public static void main(String[] args) {
        DrivingRecorder2 dr = new DrivingRecorder2();
        for (int i = 0; i < 12; i++) {
            dr.append("视频_"+i);
        }
        List<String> uStorage = new ArrayList<>();

        Iterator<String> it = dr.iterator();

        while (it.hasNext()){
            String video = it.next();
            System.out.println(video);
            if ("视频_10".equals(video) || "视频_8".equals(video)){
                uStorage.add(video);
            }
        }

        // 最后将U盘交给交警查看
        System.out.println("事故证据："+uStorage);
    }
}
